Delphi XE2 Foundations - Part 1 by Rolliston Chris
Author:Rolliston, Chris [Rolliston, Chris]
Language: eng
Format: epub
Published: 2012-06-13T20:00:00+00:00
Working with time periods (TTimeSpan)
The TTimeSpan type is for when you need to work with time durations rather than specific points in time. Declared in the System.TimeSpan unit, TTimeSpan is a record type whose instances hold a signed ‘ticks’ value (each tick is 1/10,000 of a millisecond). This value can then be read expressed in days, hours, minutes, seconds and milliseconds:
property Ticks: Int64 read FTicks;
property Days: Integer read GetDays;
property Hours: Integer read GetHours;
property Minutes: Integer read GetMinutes;
property Seconds: Integer read GetSeconds;
property Milliseconds: Integer read GetMilliseconds;
property TotalDays: Double read GetTotalDays;
property TotalHours: Double read GetTotalHours;
property TotalMinutes: Double read GetTotalMinutes;
property TotalSeconds: Double read GetTotalSeconds;
property TotalMilliseconds: Double read GetTotalMilliseconds;
Given a ticks value for a day and a half exactly, the properties of a TTimeSpan object will read as thus:
• Ticks will report 1,296,000,000,000 (10,000 x 1,000 x 60 x 60 x 24 x 1.5).
• Days will report 1.
• Hours will report 12.
• Minutes, Seconds and Milliseconds will all report 0.
• TotalDays will report 1.5.
• TotalHours will report 36.
• TotalMinutes will report 2,160 (60 x 24 x 1.5).
• TotalSeconds will report 129,600 (60 x 60 x 24 x 1.5).
• TotalMilliseconds will report 129,600,000 (1,000 x 60 x 60 x 24 x 1.5).
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
What's Done in Darkness by Kayla Perrin(26603)
The Fifty Shades Trilogy & Grey by E L James(19087)
Shot Through the Heart: DI Grace Fisher 2 by Isabelle Grey(19070)
Shot Through the Heart by Mercy Celeste(18944)
Wolf & Parchment: New Theory Spice & Wolf, Vol. 10 by Isuna Hasekura and Jyuu Ayakura(17125)
Python GUI Applications using PyQt5 : The hands-on guide to build apps with Python by Verdugo Leire(17006)
Peren F. Statistics for Business and Economics...Essential Formulas 3ed 2025 by Unknown(16885)
Wolf & Parchment: New Theory Spice & Wolf, Vol. 03 by Isuna Hasekura and Jyuu Ayakura & Jyuu Ayakura(16833)
Wolf & Parchment: New Theory Spice & Wolf, Vol. 01 by Isuna Hasekura and Jyuu Ayakura & Jyuu Ayakura(16459)
The Subtle Art of Not Giving a F*ck by Mark Manson(14363)
The 3rd Cycle of the Betrayed Series Collection: Extremely Controversial Historical Thrillers (Betrayed Series Boxed set) by McCray Carolyn(14149)
Stepbrother Stories 2 - 21 Taboo Story Collection (Brother Sister Stepbrother Stepsister Taboo Pseudo Incest Family Virgin Creampie Pregnant Forced Pregnancy Breeding) by Roxi Harding(13656)
Scorched Earth by Nick Kyme(12778)
Drei Generationen auf dem Jakobsweg by Stein Pia(10971)
Suna by Ziefle Pia(10894)
Scythe by Neal Shusterman(10344)
The Ultimate Python Exercise Book: 700 Practical Exercises for Beginners with Quiz Questions by Copy(9831)
D:\Jan\FTP\HOL\Work\Alien Breed - Tower Assault CD32 Alien Breed II - The Horror Continues Manual 1.jpg by PDFCreator(9823)
De Souza H. Master the Age of Artificial Intelligences. The Basic Guide...2024 by Unknown(9785)
